

#include "stdafx.h"

#include "../../loader.h"

using namespace dlguif;

Loader g_loader;
void*  g_main_form = NULL;
  
 


void CALLBACK OnGuiEventCallBack(void* user_context, const callback_info* ci)
{
	if(ci->eventType == EVENT_TYPE_FORM_CLOSE)
	{
		g_loader.PostExit(0);
	}
}


int _tmain(int argc, _TCHAR* argv[])
{
	g_loader.SetGuiEventCallBack(OnGuiEventCallBack, NULL);
	g_main_form = g_loader.CreateForm("caption", "window", 10, 10, 800, 600);

	g_loader.SetControlColor( g_main_form, 
		Loader::MakeDelphiColor( 255, 0, 0  )
		);


	g_loader.ShowForm(g_main_form);

	while(g_loader.ProcessMessages())
	{

		Sleep(1);
	}

	return 0;
}
